A peer-to-peer (P2P) network is a technology widely applied on the Internet at present, and can fully use idle capabilities of a terminal to serve the whole system.
A structured P2P network maintains a distributed hash table, which is divided into multiple segments. Each peer in the network stores and maintains one segment. The peers in the structured P2P network deliver and search for content in a complete self-organizing mode.
In a delivery and search process, a routing table of the peers that information passes through is required. According to routing table information, a peer judges which peer current information is sent to, so that the current information can reach the final destination peer quickly. Accuracy of the routing table directly decides correctness of P2P content delivery and search. In the P2P network, due to frequent flapping of the network, the routing table of peers needs to be updated continuously. The routing table is often updated periodically, or an updating process is initiated according to the actual requirement.
The routing table is a main target of a P2P security attack. A malicious peer tampers with routing table information or spoofs other peers to receive a false routing table, for the purpose of polluting the network and obtaining resources illegally, for example, directing the content delivery request of a user to the malicious peer and stealing the content delivered by the user, or directing the search request of a user to the malicious peer and spoofing the user by using false or even malicious content. Therefore, a muting table security policy needs to be provided to decrease the risks of network attacks.
A defending method in the prior art is: distrusting route information sent by all peers and performing check and authentication ever time route information is received. The specific method is as follows:
When a new peer joins a network, the peer sends join information for joining the network through a bootstrap peer, and collects route information of other peers to create its own initial routing table. After the initial muting table is created, the new peer sends an authentication message to peers in the obtained routing table to confirm that the route information provided by those peers is correct.
However, in the above technical solution, if the other peers in the network are malicious, and the routing table provided by those peers to the new peer includes malicious routes, the new peer cannot identify malicious routes because it can verify correctness of the routing table with only those peers, lowering security of the network.